<template>
  <a-layout>
    <!-- Header -->
    <a-layout-header class="main-header">智悦银剪</a-layout-header>
  </a-layout>
  <div class="login-page">
    <h1>登录</h1>
    <form @submit.prevent="handleLogin">
      <div class="form-group">
        <label for="user-type">用户类型：</label>
        <select style="width: 250px;font-size: 25px" id="user-type" v-model="userType" required>
          <option value="客户">客户</option>
          <option value="理发师">理发师</option>
        </select>
      </div>
      <div class="form-group">
        <label for="username">账号：</label>
        <input type="text" id="username" v-model="username" required>
      </div>
      <div class="form-group">
        <label for="password">密码：</label>
        <input type="password" id="password" v-model="password" required>
      </div>
      <a-layout>
        <a-button class="submit" style="background-color: #99BB99" type="primary" size="large">登录</a-button>
      </a-layout>
    </form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      userType: '客户',
      username: '',
      password: '',
    };
  },
  methods: {
    handleLogin() {
      // 在这里处理登录逻辑，例如验证输入、发送请求到服务器等
      console.log('登录信息:', {
        userType: this.userType,
        username: this.username,
        password: this.password,
      });
    },
  },
};
</script>

<style scoped>
.main-header {
  background: linear-gradient(to right, rgba(149,188,107,0.56), rgba(127,170,41,0.56)); /* 渐变背景 */
  color: #000000;
  text-align: center;
  padding: 30px 20px; /* 增加上下内边距 */
  font-size: 26px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影效果 */
  display: flex;
  align-items: center;
  font-weight: bold;
  justify-content: center;
}
.login-page {
  font-family: Arial, sans-serif; /* 非衬线体 */
  font-size: 25px; /* 增大字体 */
  line-height: 1.8; /* 增大行间距 */
  margin: 0 auto;
  padding: 20px;
  border-radius: 10px; /* 增大圆角 */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); /* 增大阴影以提高可见性 */
  /*background-image: url('/images/背景.jpg');*/
  height: 800px;
}

.login-page h1 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 35px; /* 标题字体更大 */
  font-weight: bold;
}

.login-page .form-group {
  margin-bottom: 25px; /* 增大表单项之间的间距 */
  font-size: 25px;
}

.login-page label {
  display: block;
  margin-bottom: 0;
  font-weight: bold; /* 加粗标签以提高可读性 */
}

.login-page input,
.login-page select {
  width: 100%;
  padding: 12px;
  font-size: 25px; /* 增大输入框内的字体 */
  border: 1px solid #000; /* 更明显的输入框边框 */
  border-radius: 5px; /* 圆角输入框 */
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.5);
}

.login-page .submit {
  display: flex;
  justify-content: center;
  margin: 0;
  background-color: transparent;
  height: 60px;
  font-size: 28px;
}
</style>